In Svelte, you can bind a <select> field to a variable using bind:value. This works for strings, numbers, or object references. When the user selects an option, the variable updates automatically.
Use bind:value to keep the selected value in sync with a variable.
Primitive values (string, number) are selected by value attribute.
Objects can be bound directly; Svelte will compare object references.
Use {#each} to generate options dynamically from an array.
Reactive statements ($:) can monitor changes to the selected value.